﻿//批操作_复制图层并添加属性
//BoBO
//20191113
//批操作
//


var selectedItems = app.project.selection;

for (var i = 0, len = selectedItems.length; i < len; i++) {
    var myName = selectedItems.name;

    if (selectedItems[i] instanceof CompItem) {

     var item = selectedItems[i]; //选中的项目
     var myLayer = 4 ; //素材请用   "素材名" | index 请输出数字
     var toLayer = 2 ; //素材请用   "素材名" | index 请输出数字


    IndexLayes = item.layer(myLayer);
    alert(IndexLayes.index)

    }else{             
        alert ("No");          
    }

}

